import request from '@/utils/request'

const prefix = '/upms/job'

export default {

  create(data) {
    return request({
      url: `${prefix}/create`,
      method: 'post',
      data
    })
  },

  update(data) {
    return request({
      url: `${prefix}/update`,
      method: 'post',
      data
    })
  },

  delete(id) {
    return request({
      url: `${prefix}/delete`,
      method: 'post',
      params: { id: id }
    })
  },

  page(data) {
    return request({
      url: `${prefix}/list`,
      method: 'post',
      data
    })
  },
  doTask(id, type) {
    return request({
      url: `${prefix}/${type}`,
      method: 'post',
      params: { id: id }
    })
  }

}
